//
//  ViewController.m
//  YLBase
//
//  Created by simpletour on 30/09/2017.
//  Copyright © 2017 YL. All rights reserved.
//

#import "ViewController.h"
#import "YLTestView.h"
#import "YLTestButton.h"
#import "YLTestTableView.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self viewTest];
//    [self buttonTest];
//    [self tableViewTest];
}

#pragma mark - View 测试
-(void)viewTest {
    YLTestView *view = [[YLTestView alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];
    [self.view addSubview:view];
}

#pragma mark - Button 测试
-(void)buttonTest {
    YLTestButton *button = [YLTestButton buttonWithType:UIButtonTypeCustom];
    [self.view addSubview:button];
}

#pragma mark - TableView 测试
//因为TableView并不是用initWithFrame:方式实例化的，所以并不会调用协议中的方法,正常情况来说也不需要,UICollectionView也是如此
-(void)tableViewTest {
    YLTestTableView *button = [[YLTestTableView alloc] initWithFrame:CGRectMake(0, 0, 100, 100) style:UITableViewStylePlain];
    [self.view addSubview:button];
}

@end
